package com.gopay.common.cps.dao.gsrt.impl;


import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.cps.dao.gsrt.GsrtRepaymentDao;
import com.gopay.common.domain.gsrt.GsrtRepayment;
/**
 * G商融通还款
 * @author princezhaoyt
 *
 */
@Repository("gsrtRepaymentDao")
public class GsrtRepaymentDaoImpl extends 
BaseDAOImpl<GsrtRepayment, Serializable> implements GsrtRepaymentDao {

	@Override
	public List<GsrtRepayment> getByMerIdOrderId(String merId, String orderId) {
		String hql = "from GsrtRepayment where  merCustId=:merCustId and merOrderId=:merOrderId ";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("merCustId", merId);
		param.put("merOrderId", orderId);
		List<GsrtRepayment> list = this.findByHql(hql, param);
		return list;
	}

	@Override
	public List<GsrtRepayment> getByGopayId(String gopayOrderId) {
		String hql=" from GsrtRepayment where gopayOrderId=:gopayOrderId ";
		Map<String, Object> param = new HashMap<String, Object>();
		param.put("gopayOrderId", gopayOrderId);
		List<GsrtRepayment> list=this.findByHql(hql, param);
		return list;
	}
	

}
